package com.javathread.th1;

import com.javathread.thread01.SleepTools;

public class StartAndRun {
	
	public static class ThreadRun extends Thread {

		@Override
		public void run() {
			int i = 90;
			while (i>0) {
				SleepTools.ms(1000);//休眠1秒
				System.out.println("当前线程 "+ Thread.currentThread().getName() + "当前 变量i =" + i--);
			}
		}
		
	}
	
	private static class User {
		public void us() {
			
		}
	}
	
	//执行主方法
	public static void main(String[] args) {
		ThreadRun beRun  = new ThreadRun();
		beRun.setName("beRun");
		//beRun.run();
		
		User user = new User();
		user.us();
		
		beRun.start();
	}
}
